import Taro, { Component, useState } from '@tarojs/taro';
import { View, Input, Image } from '@tarojs/components';
import Success from '../../../static/public/icon_success.png';
import NavigationBar from '../../../components/navigationBar/index';

import './index.scss';


function ApplySuccess() {
  const navigationBarHeight = Taro.getStorageSync('navigationBarHeight');
  const type = this.$router.params.type; // type 1  是提交表单 不传是激活成功
  return (
    <View className='apply-success' style={`margin-top: ${navigationBarHeight}`}>
      <NavigationBar text="申领卡提交" />
      <Image src={Success} className="success" />
      <View className="content">{ type ? '提交成功！' : '激活成功！' }</View>
      <View className="tip">{ type ? '您已提交成功，工作人员将在1～2个工作日内完成审核。' : '您的卡已激活成功，可以进行使用。' }</View>
      <View className="btn" onClick={() => {Taro.navigateBack()}}>返回</View>
    </View>
  )
}

ApplySuccess.config = {
  navigationBarTitleText: '申领卡提交',
}

export default ApplySuccess;
